package br.ufpb.di.knowledgetv.sqtv.modules;

import br.ufpb.di.knowledgetv.sqtv.utils.Data;
import br.ufpb.di.knowledgetv.sqtv.utils.RDFDatabase;
import com.hp.hpl.jena.rdf.model.Model;
import org.springframework.stereotype.Component;

@Component
public class SaveInstanceModule implements SQTVModule {

    private RDFDatabase database = RDFDatabase.getInstance();

    @Override
    public Data execute(Data data) {
        database.saveModel((Model) data.getData("result_model"));
        return data;
    }
}
